package src.ten;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class CollectionDemoSet {
    public static void main(String[] args) {
        Set<People> hashSet = new HashSet<People>();
        hashSet.add(new People("陈同学",201101));
        hashSet.add(new People("王同学",201102));
        hashSet.add(new People("李同学",201103));
        Iterator<People> it = hashSet.iterator();
        while (it.hasNext()){
            People next = it.next();
            System.out.println(next.getId_card()+","+next.getName());
        }
    }
}
